﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services.Protocols;

namespace blackhouse.BlackApart.Web.WebService {
	public class SiteResolveSoapExtension : SoapExtension {

		public override object GetInitializer(Type serviceType) {
			return null;
		}

		public override object GetInitializer(LogicalMethodInfo methodInfo, SoapExtensionAttribute attribute) {
			return null;
		}

		public override void Initialize(object initializer) {
		}

		public override System.IO.Stream ChainStream(System.IO.Stream stream) {
			return base.ChainStream(stream);
		}

		public override void ProcessMessage(SoapMessage message) {
			throw new Exception("abc");
			System.Diagnostics.Debug.Write("ProccessMessage");
			System.Diagnostics.Trace.Write("ProccessMessage");
			if (message.Stage == SoapMessageStage.AfterDeserialize) {
				Uri reffer = HttpContext.Current.Request.UrlReferrer;
				Console.WriteLine(reffer.ToString());
			}
		}

	}
}